cmake_minimum_required(VERSION 3.10.2)
project("lamedemo")
#导入头文件（可以让项目找到头文件，这样才能调用函数）
include_directories("${CMAKE_SOURCE_DIR}/include")
#配置动态链接库所在的目录
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}../../../../libs/${ANDROID_ABI}")
add_library( # Sets the name of the library.
        lamedemo

        # Sets the library as a shared library.
        SHARED

        # Provides a relative path to your source file(s).
        native-lib.cpp)
find_library( # Sets the name of the path variable.
        log-lib

        # Specifies the name of the NDK library that
        # you want CMake to locate.
        log)
target_link_libraries( # Specifies the target library.
        lamedemo
        mp3lame
        # Links the target library to the log library
        # included in the NDK.
        ${log-lib})